import 'package:flutter/material.dart';

///
///
class LayoutMain2Demo extends StatelessWidget {
  const LayoutMain2Demo({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        centerTitle: true,
        title: Text("LayoutMain2"),
      ),
      body: MyLayout2Widget(),
    );
  }
}

class MyLayout2Widget extends StatelessWidget {
  const MyLayout2Widget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Wrap(
      spacing: 10,
      children: [
        RaisedButton(
            onPressed: () {
              Navigator.pushNamed(context, "listView");
            },
            child: Text("ListView")),
        RaisedButton(
            onPressed: () {
              Navigator.pushNamed(context, "gridView");
            },
            child: Text("gridView")),
        RaisedButton(
            onPressed: () {
              Navigator.pushNamed(context, "listTile");
            },
            child: Text("listTile"))
      ],
    );
  }
}
